package com.backend.modules.statistics.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "教师统计数据")
public class TeacherStatisticsVO {
    
    @Schema(description = "总览数据")
    private Overview overview;
    
    @Schema(description = "班级提交情况")
    private List<ClassSubmitStatus> classSubmitStatus;
    
    @Schema(description = "近期提交趋势")
    private List<DailySubmitTrend> submitTrend;
    
    @Data
    public static class Overview {
        @Schema(description = "总任务数")
        private Integer totalTasks;
        
        @Schema(description = "进行中任务数")
        private Integer ongoingTasks;
        
        @Schema(description = "总提交数")
        private Integer totalSubmissions;
        
        @Schema(description = "待审核数")
        private Integer pendingReviews;
        
        @Schema(description = "平均提交率")
        private Double averageSubmitRate;
    }
    
    @Data
    public static class ClassSubmitStatus {
        @Schema(description = "班级ID")
        private Long classId;
        
        @Schema(description = "班级名称")
        private String className;
        
        @Schema(description = "学生总数")
        private Integer totalStudents;
        
        @Schema(description = "已提交数")
        private Integer submittedCount;
        
        @Schema(description = "未提交数")
        private Integer unsubmittedCount;
        
        @Schema(description = "提交率")
        private Double submitRate;
        
        public ClassSubmitStatus(Long classId, String className, 
                Long totalStudents, Long submittedCount, Long unsubmittedCount, Double submitRate) {
            this.classId = classId;
            this.className = className;
            this.totalStudents = totalStudents.intValue();
            this.submittedCount = submittedCount.intValue();
            this.unsubmittedCount = unsubmittedCount.intValue();
            this.submitRate = submitRate;
        }
        
        public ClassSubmitStatus() {
        }
    }
    
    @Data
    public static class DailySubmitTrend {
        @Schema(description = "日期")
        private String date;
        
        @Schema(description = "提交数量")
        private Integer submitCount;
        
        @Schema(description = "逾期数量")
        private Integer overdueCount;
    }
} 